- return unless show_code_suggestions_alert?

- content_for :page_level_alert do
  %div{ class: [container_class, @content_class, 'gl-pt-5!'] }
    = render Pajamas::AlertComponent.new(title: s_('CodeSuggestionsAlert|Get started with Code Suggestions, available for free during the beta period.'),
      alert_options: { class: 'js-code-suggestions-alert-dismiss', data: { uid: 'code_suggestions_alert_dismissed' } },
      close_button_options: { class: 'js-close-callout', data: { testid: 'code_suggestions_alert_dismiss' }}) do |c|
      - c.with_body do
        - preference_link_start = '<a href="%{url}">'.html_safe % { url: profile_preferences_path(anchor: 'code-suggestions-settings') }
        - docs_link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('user/project/repository/code_suggestions', anchor: 'enable-code-suggestions-in-vs-code') }
        - link_end = '</a>'.html_safe
        = s_("CodeSuggestionsAlert|Code faster and more efficiently with AI-powered code suggestions in VS Code. 13 languages are supported, including Javascript, Python, Go, Java, and Kotlin. Enable Code Suggestions in your %{preference_link_start}user profile preferences%{link_end} or %{docs_link_start}see the documentation%{link_end} to learn more.").html_safe % { preference_link_start: preference_link_start,
          docs_link_start: docs_link_start, link_end: link_end }
      - c.with_actions do
        = render Pajamas::ButtonComponent.new(href: profile_preferences_path(anchor: 'code-suggestions-settings'), variant: :confirm) do
          = s_('CodeSuggestionsAlert|Enable Code Suggestions')
